package com.lixinyue.test08;



/**
 * @program: 11.12
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-16 19:17
 **/
interface IShape{
    public  abstract void draw();
//    void draw2();
public static final int a=10;
default public void funa(){
    System.out.println("接口的默认方法");
}
default public void funb(){
 }
 public static void funStattic(){

 }
}
class Flower implements IShape {
    @Override
    public void draw(){
        System.out.println("❀");
    }
}

class Circle implements IShape{
    @Override
    public void draw() {
        System.out.println("●");
    }
}
class Rect implements IShape{
    @Override
    public void draw() {
        System.out.println("♦");
    }

    @Override
    public void funa() {
        System.out.println("重写接口当中的默认方法");
    }
}

public class Test {

    public static void DrawMAp(IShape iShape){
        iShape.draw();
    }
    public static void main(String[] args) {
//    IShape iShape=new Rect();
//    iShape.draw();
        DrawMAp(new Flower());
        DrawMAp(new Circle());
        DrawMAp(new Rect());


    }
}
